package com.atguigu.client;

import com.atguigu.result.RetVal;
import com.atguigu.search.SearchParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * SearchFeignClient
 *
 * @author yangchao
 * @version 开发阶段
 * @description TODO
 * @date 2022/3/1 14:23
 */
@FeignClient(value = "shop-search" )
public interface SearchFeignClient {
    //商品上架
    @GetMapping("/search/onSale/{skuId}")
    public RetVal onSale(@PathVariable Long skuId);

    //商品下架
    @GetMapping("/search/offSale/{skuId}")
    public RetVal offSale(@PathVariable Long skuId);

    //4.商品的热度排名
    @GetMapping("/search/incrHotScore/{skuId}")
    public RetVal incrHotScore(@PathVariable Long skuId);

    @PostMapping("/search")
    public RetVal searchProduct(@RequestBody SearchParam searchParam);
}

